/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.qmrz.utils.sign;

import java.security.MessageDigest;

public class SHA1 {

    public static String getHashValue(String str) {
        String strResult = "";
        try {
            MessageDigest messageDigest = MessageDigest.getInstance("SHA1");
            messageDigest.update(str.getBytes());
            strResult = Util.byteToHex(messageDigest.digest());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return strResult;
    }

}
